// NOWHINE NC009 <- Shared file with system team so uses non-CamX file naming
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2017 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  wb12setting.h
/// @brief WB12 module setting calculation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef WB12SETTING_H
#define WB12SETTING_H

#include "iqcommondefs.h"
#include "iqsettingutil.h"

// Const Min Max values for WB12
static const INT32  WB12GainTableMinValue = 0;
static const INT32  WB12GainTableMaxValue = ((1 << 12) - 1);

/// @brief Unpacked Data for WB12 Module
// NOWHINE NC004c: Share code with system team
struct WB12UnpackedField
{
    ///< Left 3D image
    UINT16 gainChannel0Left;    ///< green channel gain, 12uQ7
    UINT16 gainChannel1Left;    ///< blue channel gain, 12uQ7
    UINT16 gainChannel2Left;    ///< red channel gain, 12uQ7
    UINT16 offsetChannel0Left;  ///< green channel offset, 13s/15s
    UINT16 offsetChannel1Left;  ///< blue channel offset, 13s/15s
    UINT16 offsetChannel2Left;  ///< red channel offset, 13s/15s
};

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Class that implements WB12module setting calculation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// NOWHINE NC004c: Share code with system team
class WB12Setting
{
public:
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// CalculateHWSetting
    ///
    /// @brief  Calculate the unpacked register value
    ///
    /// @param  pInput   Pointer to the input data
    /// @param  pRegCmd  Pointer to the unpacked data
    ///
    /// @return true for success
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static BOOL CalculateHWSetting(
        const WB12InputData* pInput,
        VOID*                pRegCmd);
};
#endif // WB12_H
